Source code comprises a series of declarative expressions used to configure a computing device to function. For example, source code can be compiled into executable code that actually directs the operations of a computing device. As another example, source code can be interpreted into an intermediate representation (e.g., bytecode) that directs the operations of the computing device.
Declarative expressions can be used in web scripts or other source code to generate bytecode or executable code that allows for variable names to be dynamically defined at runtime along with values for the variables. For example, an expression in a code generation file for an application server may be parsed by the application server to generate byte code which analyzes a series of parameters contained in a URL invoking use of the code generation file. The byte code can reference a data structure (“struct”) during operation, and so an expression for setting up the data structure can be included in the code generation file.
The expression may define a number of key-value pairs to be included in a struct based on the contents of some runtime expressions. An example can be to use various scopes as part of runtime expressions including the URL. Then, certain URL parameters may be matched to keys and other parameters matched to respective values associated with the keys by other code. However, a developer may be limited in use of the strict—for example, the developer may be able to write code to set values dynamically but may be required to define the keys and/or structure name in the source code. This may be problematic—for instance, the URL cannot always be guaranteed to use the same mapping for variable names and values.